package com.lj.mcore.service;

import com.lj.mcore.entity.StoreCart;

import java.util.List;
import java.util.Map;

public interface IStoreCartService {

    /**
     * 查询某一个商铺下，是否有商铺购物车记录，没有新建，有就计算商铺购物车总价
     */
    public static final String FIND_STORE_CART="from StoreCart obj where obj.deleteStatus =:deleteStatus and obj.user.id=:uid " +
            "and obj.store.id=:sid order by obj.updateTime desc";

    /**
     * 查询用户的所有商品购物车信息
     */
    public static final String CART_INDEX="from StoreCart obj where obj.deleteStatus =:deleteStatus and obj.user.id=:uid " +
            "order by obj.updateTime desc";

    public abstract boolean save(StoreCart obj);

    public abstract boolean delete(Long id);

    public abstract boolean update(StoreCart obj);

    public abstract StoreCart getObjById(Long id);

    public abstract List<StoreCart> query(String paramString, Map paramMap, int paramInt1, int paramInt2);

}
